using System;
using System.Text.RegularExpressions;

namespace Phoenix
{
    public class PhoenixConfiguration
    {
        string defaultControllerAction = "Home.Index";

        public string DefaultControllerAction
        {
            get { return defaultControllerAction; }
            set
            {
                if (!string.IsNullOrEmpty(value) && !Regex.Match(value, @"\w+(\d|\w)*?.\w+(\d|\w)*?").Success)
                    throw new ArgumentException("DefaultControllerAction must be in the format ControllerName.ActionName");
                defaultControllerAction = value;
            }
        }

        public object[] DefaultControllerActionArguments { get; set; }
        public PhoenixStartupOptions StartupOptions { get; set; }
    }
}